// map集合 键值对集合 接收二维数组
let obj = {
    name: "zhangsan",
    age: 12,
    gender: '男'
};
let entries = Object.entries(obj);
let map = new Map(entries);
console.log(map);
// 添加
map.set('{name:"李四"}', '我不是李四');
map.set('1', '1');
console.log(map);
// 删除
map.delete('name');
console.log(map);
// 获取
console.log(map.get('1'));
console.log(map.size, 'map的长度');
// 遍历
console.log(map.keys());
console.log(map.values());
console.log(map.entries());
map.forEach((value, key) => {
    console.log(value, key);
})